﻿using System;

namespace HslCommunication
{
	/// <summary>
	/// 操作结果的泛型类，允许带九个用户自定义的泛型对象，推荐使用这个类
	/// </summary>
	/// <typeparam name="T1">泛型类</typeparam>
	/// <typeparam name="T2">泛型类</typeparam>
	/// <typeparam name="T3">泛型类</typeparam>
	/// <typeparam name="T4">泛型类</typeparam>
	/// <typeparam name="T5">泛型类</typeparam>
	/// <typeparam name="T6">泛型类</typeparam>
	/// <typeparam name="T7">泛型类</typeparam>
	/// <typeparam name="T8">泛型类</typeparam>
	/// <typeparam name="T9">泛型类</typeparam>
	// Token: 0x0200001D RID: 29
	public class OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9> : OperateResult
	{
		/// <summary>
		/// 实例化一个默认的结果对象
		/// </summary>
		// Token: 0x060001D1 RID: 465 RVA: 0x00005A52 File Offset: 0x00003C52
		public OperateResult()
		{
		}

		/// <summary>
		/// 使用指定的消息实例化一个默认的结果对象
		/// </summary>
		/// <param name="msg">错误消息</param>
		// Token: 0x060001D2 RID: 466 RVA: 0x00005A5C File Offset: 0x00003C5C
		public OperateResult(string msg) : base(msg)
		{
		}

		/// <summary>
		/// 使用错误代码，消息文本来实例化对象
		/// </summary>
		/// <param name="err">错误代码</param>
		/// <param name="msg">错误消息</param>
		// Token: 0x060001D3 RID: 467 RVA: 0x00005A67 File Offset: 0x00003C67
		public OperateResult(int err, string msg) : base(err, msg)
		{
		}

		/// <summary>
		/// 用户自定义的泛型数据1
		/// </summary>
		// Token: 0x1700006D RID: 109
		// (get) Token: 0x060001D4 RID: 468 RVA: 0x000074D3 File Offset: 0x000056D3
		// (set) Token: 0x060001D5 RID: 469 RVA: 0x000074DB File Offset: 0x000056DB
		public T1 Content1 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据2
		/// </summary>
		// Token: 0x1700006E RID: 110
		// (get) Token: 0x060001D6 RID: 470 RVA: 0x000074E4 File Offset: 0x000056E4
		// (set) Token: 0x060001D7 RID: 471 RVA: 0x000074EC File Offset: 0x000056EC
		public T2 Content2 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据3
		/// </summary>
		// Token: 0x1700006F RID: 111
		// (get) Token: 0x060001D8 RID: 472 RVA: 0x000074F5 File Offset: 0x000056F5
		// (set) Token: 0x060001D9 RID: 473 RVA: 0x000074FD File Offset: 0x000056FD
		public T3 Content3 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据4
		/// </summary>
		// Token: 0x17000070 RID: 112
		// (get) Token: 0x060001DA RID: 474 RVA: 0x00007506 File Offset: 0x00005706
		// (set) Token: 0x060001DB RID: 475 RVA: 0x0000750E File Offset: 0x0000570E
		public T4 Content4 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据5
		/// </summary>
		// Token: 0x17000071 RID: 113
		// (get) Token: 0x060001DC RID: 476 RVA: 0x00007517 File Offset: 0x00005717
		// (set) Token: 0x060001DD RID: 477 RVA: 0x0000751F File Offset: 0x0000571F
		public T5 Content5 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据6
		/// </summary>
		// Token: 0x17000072 RID: 114
		// (get) Token: 0x060001DE RID: 478 RVA: 0x00007528 File Offset: 0x00005728
		// (set) Token: 0x060001DF RID: 479 RVA: 0x00007530 File Offset: 0x00005730
		public T6 Content6 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据7
		/// </summary>
		// Token: 0x17000073 RID: 115
		// (get) Token: 0x060001E0 RID: 480 RVA: 0x00007539 File Offset: 0x00005739
		// (set) Token: 0x060001E1 RID: 481 RVA: 0x00007541 File Offset: 0x00005741
		public T7 Content7 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据8
		/// </summary>
		// Token: 0x17000074 RID: 116
		// (get) Token: 0x060001E2 RID: 482 RVA: 0x0000754A File Offset: 0x0000574A
		// (set) Token: 0x060001E3 RID: 483 RVA: 0x00007552 File Offset: 0x00005752
		public T8 Content8 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据9
		/// </summary>
		// Token: 0x17000075 RID: 117
		// (get) Token: 0x060001E4 RID: 484 RVA: 0x0000755B File Offset: 0x0000575B
		// (set) Token: 0x060001E5 RID: 485 RVA: 0x00007563 File Offset: 0x00005763
		public T9 Content9 { get; set; }

		/// <summary>
		/// 返回一个检查结果对象，可以进行自定义的数据检查。<br />
		/// Returns a check result object that allows you to perform custom data checks.
		/// </summary>
		/// <param name="check">检查的委托方法</param>
		/// <param name="message">检查失败的错误消息</param>
		/// <returns>如果检查成功，则返回对象本身，如果失败，返回错误信息。</returns>
		// Token: 0x060001E6 RID: 486 RVA: 0x0000756C File Offset: 0x0000576C
		public OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9> Check(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool> check, string message = "All content data check failed")
		{
			bool flag = !base.IsSuccess;
			OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9> result;
			if (flag)
			{
				result = this;
			}
			else
			{
				bool flag2 = check.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9);
				if (flag2)
				{
					result = this;
				}
				else
				{
					result = new OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9>(message);
				}
			}
			return result;
		}

		/// <summary>
		/// 返回一个检查结果对象，可以进行自定义的数据检查。<br />
		/// Returns a check result object that allows you to perform custom data checks.
		/// </summary>
		/// <param name="check">检查的委托方法</param>
		/// <returns>如果检查成功，则返回对象本身，如果失败，返回错误信息。</returns>
		// Token: 0x060001E7 RID: 487 RVA: 0x000075DC File Offset: 0x000057DC
		public OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9> Check(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult> check)
		{
			bool flag = !base.IsSuccess;
			OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9> result;
			if (flag)
			{
				result = this;
			}
			else
			{
				OperateResult operateResult = check.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result = OperateResult.CreateFailedResult<T1, T2, T3, T4, T5, T6, T7, T8, T9>(operateResult);
				}
				else
				{
					result = this;
				}
			}
			return result;
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001E8 RID: 488 RVA: 0x00007654 File Offset: 0x00005854
		public OperateResult Then(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : this;
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。
		/// </summary>
		/// <typeparam name="TResult">泛型参数</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001E9 RID: 489 RVA: 0x000076A8 File Offset: 0x000058A8
		public OperateResult<TResult> Then<TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001EA RID: 490 RVA: 0x00007704 File Offset: 0x00005904
		public OperateResult<TResult1, TResult2> Then<TResult1, TResult2>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult1, TResult2>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult1, TResult2>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001EB RID: 491 RVA: 0x00007760 File Offset: 0x00005960
		public OperateResult<TResult1, TResult2, TResult3> Then<TResult1, TResult2, TResult3>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult1, TResult2, TResult3>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001EC RID: 492 RVA: 0x000077BC File Offset: 0x000059BC
		public OperateResult<TResult1, TResult2, TResult3, TResult4> Then<TResult1, TResult2, TResult3, TResult4>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult1, TResult2, TResult3, TResult4>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001ED RID: 493 RVA: 0x00007818 File Offset: 0x00005A18
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5> Then<TResult1, TResult2, TResult3, TResult4, TResult5>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001EE RID: 494 RVA: 0x00007874 File Offset: 0x00005A74
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <typeparam name="TResult7">泛型参数七</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001EF RID: 495 RVA: 0x000078D0 File Offset: 0x00005AD0
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <typeparam name="TResult7">泛型参数七</typeparam>
		/// <typeparam name="TResult8">泛型参数八</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001F0 RID: 496 RVA: 0x0000792C File Offset: 0x00005B2C
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <typeparam name="TResult7">泛型参数七</typeparam>
		/// <typeparam name="TResult8">泛型参数八</typeparam>
		/// <typeparam name="TResult9">泛型参数九</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001F1 RID: 497 RVA: 0x00007988 File Offset: 0x00005B88
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <typeparam name="TResult7">泛型参数七</typeparam>
		/// <typeparam name="TResult8">泛型参数八</typeparam>
		/// <typeparam name="TResult9">泛型参数九</typeparam>
		/// <typeparam name="TResult10">泛型参数十</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x060001F2 RID: 498 RVA: 0x000079E4 File Offset: 0x00005BE4
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9, TResult10> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9, TResult10>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9, TResult10>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9, TResult10>(this);
		}
	}
}
